package com.atguigu.scala.chapter6

/**
 * @author lizikuan
 * @date 2021/5/21 19:53
 */
object $02_ClassAndProperty {
    class Student {
      val name = "小明"
      var age:Int = _
      private val address = "diqiu"
      def getAddress() = address
      def sum (x:Int,y:Int):Int = x+y
    }

  def main(args: Array[String]): Unit = {
    val student = new Student
    println(student.age)
    println(student.name)
    println(student.sum(2,6))
    println(student.getAddress())
  }
}
